package designPattern.decorator;

public class Decorator implements Component {
	 /**持有私有的原始构件*/
	private Component component;
	
	 /**构造子，委派给原始构件*/
    protected Decorator(Component component) {
        this.component = component;
    }
    /**调用原始构件功能，通常就可直接把扩展功能加在此方法中*/
	@Override
	public void go() {
		this.component.go();
	}

}
